package top.yisen614.dubbo.provider.service;

import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Service;
import top.yisen614.entity.People;
import top.yisen614.service.PeopleService;

import java.util.Random;

@Slf4j
@Service(version = "1.0.0")
public class PeopleServiceImpl implements PeopleService {

    @Override
    public People getPeople(People people) {
        people.setId(new Random().nextInt(10000));
        log.debug("People: {}, ID: {}", people.getName(), people.getId());
        return people;
    }
}
